/**
 * @file     Rules.h
 * @brief    Interface for all rules.
 *
 * @author   Franco Riberi
 * @email    fgriberi AT gmail.com
 *
 * Contents: Header file for titere providing rules interface.
 *
 * System:   titere: Target Ideal TEmperature Rna Expression
 * Language: C++
 *
 * @date January 8, 2014
 *
 * Copyright (C) 2014 Franco Riberi, FuDePAN
 *
 * This file is part of the titere.
 *
 * Titere is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Titere is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with titere. If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef RULES_H
#define RULES_H

#include "titere/PredicateRule.h"

namespace NSTitere
{

/**
 * @brief Responsible to check if the sequence begin with adenine or uracil
 */
class StartWithAdenineOrUracil : public IPredicateRule
{
    /**
     * @brief Destructor class
     */
    virtual ~StartWithAdenineOrUracil() = default;

    /**
     * @brief Checks whether the rule is met.
     *
     * @param sequence Input sequence
     * @return True if the rule is met, otherwise false.
     */
    virtual bool checkRule(const biopp::NucSequence& sequence);
};

/**
 * @brief Responsible to check the amount of adenine or uracil in the range [1-8]
 */
class FirstEigthNucleotide : public IPredicateRule
{
    /**
     * @brief Destructor class
     */
    virtual ~FirstEigthNucleotide() = default;

    /**
     * @brief Checks whether the rule is met.
     *
     * @param sequence Input sequence
     * @return True if the rule is met, otherwise false.
     */
    virtual bool checkRule(const biopp::NucSequence& sequence);
};

/**
 * @brief Responsible to check if the nucleotide nineteen is guanine or cytosine
 */
class NucleotidNineteen : public IPredicateRule
{
    /**
     * @brief Destructor class
     */
    virtual ~NucleotidNineteen() = default;

    /**
     * @brief Checks whether the rule is met.
     *
     * @param sequence Input sequence
     * @return True if the rule is met, otherwise false.
     */
    virtual bool checkRule(const biopp::NucSequence& sequence);
};

} // namespace NSTitete

#endif

